﻿using System;
using UnityEngine;

namespace RootMotion.FinalIK
{
	// Token: 0x0200000E RID: 14
	[Serializable]
	public class BipedIKSolvers
	{
		// Token: 0x17000007 RID: 7
		// (get) Token: 0x06000136 RID: 310 RVA: 0x0001E814 File Offset: 0x0001CA14
		public IKSolverLimb[] limbs
		{
			get
			{
				if (this._limbs == null || (this._limbs != null && this._limbs.Length != 4))
				{
					this._limbs = new IKSolverLimb[]
					{
						this.leftFoot,
						this.rightFoot,
						this.leftHand,
						this.rightHand
					};
				}
				return this._limbs;
			}
		}

		// Token: 0x17000008 RID: 8
		// (get) Token: 0x06000137 RID: 311 RVA: 0x0001E87C File Offset: 0x0001CA7C
		public IKSolver[] ikSolvers
		{
			get
			{
				if (this._ikSolvers == null || (this._ikSolvers != null && this._ikSolvers.Length != 7))
				{
					this._ikSolvers = new IKSolver[]
					{
						this.leftFoot,
						this.rightFoot,
						this.leftHand,
						this.rightHand,
						this.spine,
						this.lookAt,
						this.aim
					};
				}
				return this._ikSolvers;
			}
		}

		// Token: 0x06000138 RID: 312 RVA: 0x0001E900 File Offset: 0x0001CB00
		public void AssignReferences(BipedReferences references)
		{
			this.leftHand.SetChain(references.leftUpperArm, references.leftForearm, references.leftHand, references.root);
			this.rightHand.SetChain(references.rightUpperArm, references.rightForearm, references.rightHand, references.root);
			this.leftFoot.SetChain(references.leftThigh, references.leftCalf, references.leftFoot, references.root);
			this.rightFoot.SetChain(references.rightThigh, references.rightCalf, references.rightFoot, references.root);
			this.spine.SetChain(references.spine, references.root);
			this.lookAt.SetChain(references.spine, references.head, references.eyes, references.root);
			this.aim.SetChain(references.spine, references.root);
			this.leftFoot.goal = AvatarIKGoal.LeftFoot;
			this.rightFoot.goal = AvatarIKGoal.RightFoot;
			this.leftHand.goal = AvatarIKGoal.LeftHand;
			this.rightHand.goal = AvatarIKGoal.RightHand;
		}

		// Token: 0x0400007B RID: 123
		public IKSolverLimb leftFoot = new IKSolverLimb(AvatarIKGoal.LeftFoot);

		// Token: 0x0400007C RID: 124
		public IKSolverLimb rightFoot = new IKSolverLimb(AvatarIKGoal.RightFoot);

		// Token: 0x0400007D RID: 125
		public IKSolverLimb leftHand = new IKSolverLimb(AvatarIKGoal.LeftHand);

		// Token: 0x0400007E RID: 126
		public IKSolverLimb rightHand = new IKSolverLimb(AvatarIKGoal.RightHand);

		// Token: 0x0400007F RID: 127
		public IKSolverFABRIK spine = new IKSolverFABRIK();

		// Token: 0x04000080 RID: 128
		public IKSolverLookAt lookAt = new IKSolverLookAt();

		// Token: 0x04000081 RID: 129
		public IKSolverAim aim = new IKSolverAim();

		// Token: 0x04000082 RID: 130
		public Constraints pelvis = new Constraints();

		// Token: 0x04000083 RID: 131
		public IKSolverLimb[] _limbs;

		// Token: 0x04000084 RID: 132
		public IKSolver[] _ikSolvers;
	}
}
